﻿<%       

sub writeTopNewItems
	dim mlHost
	set mlHost = new MLHostClass
	mlHost.load()
	dim blogItem, blogItems, count, i, tmpBlogObj
    blogItems = mlHost.getTopNewItems
    count = 0
    if isArray(blogItems) then
		count = ubound(blogItems)
    end if
    if count>0 then
%>
<SCRIPT language="javascript">
  function switchDisplayTop10(id){
    try{
        var obj = document.getElementById(id);
        if (obj.style.display=="block"){
            obj.style.display="none";
        }else{
            obj.style.display="block";
        }
     }catch(e){   
        alert(e.description)
     }
  }
</SCRIPT>
       <!--<a href="#" onclick="switchDisplayTop10('topNewItems')">--><strong>最新发表的文章</strong><br>
       <DIV class="content" id="topNewItems" style="display:block">
       <table align=center border=0 width=100% ID="Table1">        
		<tr>                                         
			<td  width=20% ><font color=#333333><strong>Blog</strong></font></td> 
			<td  ><font color=#333333><strong>Title</strong></font></td>             
			<td  width=15% ><font color=#333333><strong>Author</strong></font></td> 
			<td  width=10%  ><font color=#333333><strong>Date</strong></font></td> 
		</tr> 
<%
	set tmpBlogObj = new BlogClass
	for i=0 to count-1
		set blogItem = blogItems(i)
		tmpBlogObj.load(blogItem.blogId)
%>
		<tr>                                         
			<td  nowrap ><a href=index.asp?blog_id=<%=blogItem.blogId%>><%=tmpBlogObj.blogTitle%></a></td> 
			<td ><a href=detail.asp?blog_id=<%=blogItem.blogId%>&content_id=<%=blogItem.itemId%>><%=blogItem.title%></a></td>             
			<td ><%=blogItem.userName%></td> 
			<td nowrap  ><%=blogItem.startDate%></td> 
		</tr> 
<%
	next
%>		
	   </table>	
       </DIV>
<%
	end if
	set mlHost = nothing
end sub	

%>	   

  
            
<%       
sub writeTopReferedNewItems
	dim mlHost
	set mlHost = new MLHostClass
	mlHost.load()
	dim blogItem, blogItems, count, i, tmpBlogObj
    blogItems = mlHost.getTopReferedNewItems
    count = 0
    if isArray(blogItems) then
		count = ubound(blogItems)
    end if
    if count>0 then
%>
<SCRIPT language="javascript">
  function switchDisplayTop10(id){
    try{
        var obj = document.getElementById(id);
        if (obj.style.display=="block"){
            obj.style.display="none";
        }else{
            obj.style.display="block";
        }
     }catch(e){   
        alert(e.description)
     }
  }
</SCRIPT>
       <!--<a href="#" onclick="switchDisplayTop10('topReferedNewItems')">--><strong>近期最受欢迎的文章</strong><br>
       <DIV class=content id="topReferedNewItems" style="display:block">
       <table align=center border=0 width=100% ID="Table2">        
		<tr>                                         
			<td  width=20% ><font color=#333333><strong>Blog</strong></font></td> 
			<td  ><font color=#333333><strong>Title</strong></font></td>             
			<td  width=15% ><font color=#333333><strong>Author</strong></font></td> 
			<td  width=10%  ><font color=#333333><strong>Date</strong></font></td> 
		</tr> 
<%
	set tmpBlogObj = new BlogClass
	for i=0 to count-1
		set blogItem = blogItems(i)
		tmpBlogObj.load(blogItem.blogId)
%>
		<tr>                                         
			<td  nowrap ><a href=index.asp?blog_id=<%=blogItem.blogId%>><%=tmpBlogObj.blogTitle%></a></td> 
			<td ><a href=detail.asp?blog_id=<%=blogItem.blogId%>&content_id=<%=blogItem.itemId%>><%=blogItem.title%></a></td>             
			<td ><%=blogItem.userName%></td> 
			<td nowrap  ><%=blogItem.startDate%></td> 
		</tr> 
<%
	next
%>		
	   </table>	
       </DIV>
<%
	end if
	set mlHost = nothing	
end sub	

%>	     


            
<%       
sub writeTopReferedItems
	dim mlHost
	set mlHost = new MLHostClass
	mlHost.load()
	dim blogItem, blogItems, count, i, tmpBlogObj
    blogItems = mlHost.getTopReferedItems
    count = 0
    if isArray(blogItems) then
		count = ubound(blogItems)
    end if
    if count>0 then
%>
<SCRIPT language="javascript">
  function switchDisplayTop10(id){
    try{
        var obj = document.getElementById(id);
        if (obj.style.display=="block"){
            obj.style.display="none";
        }else{
            obj.style.display="block";
        }
     }catch(e){   
        alert(e.description)
     }
  }
</SCRIPT>
       <!--<a href="#" onclick="switchDisplayTop10('topReferedItems')">--><strong>文章访问排行榜</strong><br>
       <DIV class=content id="topReferedItems" style="display:block">
       <table align=center border=0 width=100% ID="Table2">        
		<tr>                                         
			<td  width=20% ><font color=#333333><strong>Blog</strong></font></td> 
			<td  ><font color=#333333><strong>Title</strong></font></td>             
			<td  width=15% ><font color=#333333><strong>Author</strong></font></td> 
			<td  width=10%  ><font color=#333333><strong>Date</strong></font></td> 
		</tr> 
<%
	set tmpBlogObj = new BlogClass
	for i=0 to count-1
		set blogItem = blogItems(i)
		tmpBlogObj.load(blogItem.blogId)
%>
		<tr>                                         
			<td  nowrap ><a href=index.asp?blog_id=<%=blogItem.blogId%>><%=tmpBlogObj.blogTitle%></a></td> 
			<td ><a href=detail.asp?blog_id=<%=blogItem.blogId%>&content_id=<%=blogItem.itemId%>><%=blogItem.title%></a></td>             
			<td ><%=blogItem.userName%></td> 
			<td nowrap  ><%=blogItem.startDate%></td> 
		</tr> 
<%
	next
%>		
	   </table>	
       </DIV>
<%
	end if
	set mlHost = nothing	
end sub	

%>	   

  